-module (testdb).
-behaviour (gen_fragment).
-export ([ init/1,
           handle_call/3,
           handle_cast/2,
           handle_info/2,
           terminate/2,
           code_change/3 ]).

init ([ Table, Frags, Copies ]) ->
  gen_fragment:ensure_table (Table,
                             [ { frag_properties, [
                                 { n_fragments, Frags },
                                 { node_pool, 
                                   mnesia:system_info (running_db_nodes) },
                                 { n_ram_copies, Copies }
                             ] } ]),

  { ok, [ Table ], void }.

handle_call (_Request, _From, void) -> { noreply, void }.
handle_cast (_Request, void) -> { noreply, void }.
handle_info (_Msg, void) -> { noreply, void }.
terminate (_Reason, void) -> ok.
code_change (_OldVsn, void, _Extra) -> { ok, void }.
